package com.skivingcloud.report.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 组件 实体类。
 *
 * @author skivingcloud
 * @since 2024-09-12
 */
@Schema(description = "组件")
@Table("report_dashboard_widget")
public class ReportDashboardWidget implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 组件id
     */
    @Id
    @Schema(description = "组件id")
    private String id;

    /**
     * 报表编码
     */
    @Schema(description = "报表编码")
    private String reportCode;

    /**
     * 组件类型参考字典DASHBOARD_PANEL_TYPE
     */
    @Schema(description = "组件类型参考字典DASHBOARD_PANEL_TYPE")
    private String type;

    /**
     * 组件的渲染属性json
     */
    @Schema(description = "组件的渲染属性json")
    private String setup;

    /**
     * 组件的数据属性json
     */
    @Schema(description = "组件的数据属性json")
    private String data;

    /**
     * 组件的配置属性json
     */
    @Schema(description = "组件的配置属性json")
    private String collapse;

    /**
     * 组件的大小位置属性json
     */
    @Schema(description = "组件的大小位置属性json")
    private String position;

    /**
     * options配置项
     */
    @Schema(description = "options配置项")
    private String options;

    /**
     * 自动刷新间隔秒
     */
    @Schema(description = "自动刷新间隔秒")
    private Integer refreshSeconds;

    /**
     * 0--已禁用 1--已启用  DIC_NAME=ENABLE_FLAG
     */
    @Schema(description = "0--已禁用 1--已启用  DIC_NAME=ENABLE_FLAG")
    private String enableFlag;

    /**
     *  0--未删除 1--已删除 DIC_NAME=DEL_FLAG
     */
    @Schema(description = " 0--未删除 1--已删除 DIC_NAME=DEL_FLAG")
    private String deleteFlag;

    /**
     * 排序，图层的概念
     */
    @Schema(description = "排序，图层的概念")
    private Long sort;

    @Schema(description = "")
    private String createBy;

    @Schema(description = "")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @Schema(description = "")
    private String updateBy;

    @Schema(description = "")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @Schema(description = "版本号")
    private Integer version;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getReportCode() {
        return reportCode;
    }

    public void setReportCode(String reportCode) {
        this.reportCode = reportCode;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSetup() {
        return setup;
    }

    public void setSetup(String setup) {
        this.setup = setup;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getCollapse() {
        return collapse;
    }

    public void setCollapse(String collapse) {
        this.collapse = collapse;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getOptions() {
        return options;
    }

    public void setOptions(String options) {
        this.options = options;
    }

    public Integer getRefreshSeconds() {
        return refreshSeconds;
    }

    public void setRefreshSeconds(Integer refreshSeconds) {
        this.refreshSeconds = refreshSeconds;
    }

    public String getEnableFlag() {
        return enableFlag;
    }

    public void setEnableFlag(String enableFlag) {
        this.enableFlag = enableFlag;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

}
